package com.dao.system.support;

import java.util.List;

import com.dao.spring.SystemBaseDao;
import com.dao.system.IPSWDDao;
import com.pojo.system.PSWD;
import com.pojo.system.PSWDPk;
@SuppressWarnings("unchecked")
public class PSWDDao extends SystemBaseDao implements IPSWDDao {

	public PSWD findPSWDById(java.io.Serializable pk) {
		return super.getHibernateTemplate().get(PSWD.class, pk);
	}

	public List<PSWD> findPSWDByIdAndPwd(PSWDPk pk,String pwd) {
		return super.getHibernateTemplate().find("from PSWD as pswd where pswd.id.usr='"+pk.getUsr()+"' and pswd.id.compno='"+pk.getCompno()+"' and pswd.pwd='"+pwd+"'");
	}

	public List<PSWD> findAllPSWDByCompNo(String compNo) {
		return super.getHibernateTemplate().find("from PSWD as pswd where pswd.id.compno='"+compNo+"'");
	}

	

}
